]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm/util: Set minimum display time for authentication messages
authorJoan Torres Lopez <joantolo@redhat.com>
Wed, 28 Jan 2026 17:01:26 +0000 (18:01 +0100)
committerJoan Torres Lopez <joantolo@redhat.com>
Wed, 28 Jan 2026 17:03:50 +0000 (18:03 +0100)
Short messages like "PIN locked" were previously displayed for only
480ms (10 chars × 48ms), making them impossible to read. Ensure all
messages are shown for at least 2 seconds.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4054>

js/gdm/util.js

index 88183c7dc625bb55c84b9382c52cad05fa6f21f1..e9262b138cca1af1079b653e840aae9a28ae3c27 100644 (file)
@@ -43,7 +43,10 @@ export const LOGO_KEY = 'logo';
 export const DISABLE_USER_LIST_KEY = 'disable-user-list';
 
 // Give user 48ms to read each character of a PAM message
+// or 2 seconds, whichever is longer
 const USER_READ_TIME = 48;
+const USER_READ_TIME_MIN = 2000;
+
 const FINGERPRINT_SERVICE_PROXY_TIMEOUT = 5000;
 const FINGERPRINT_ERROR_TIMEOUT_WAIT = 15;
 
@@ -250,7 +253,7 @@ export class ShellUserVerifier extends Signals.EventEmitter {
             return 0;
 
         // We probably could be smarter here
-        return message.length * USER_READ_TIME;
+        return Math.max(message.length * USER_READ_TIME, USER_READ_TIME_MIN);
     }
 
     finishMessageQueue() {